define([
	'jquery',
	'backbone',
	'main'
	], function( $, Backbone, Main ) {

	var Router = Backbone.Router.extend({
		routes:{
			'': 'getMainView',
			'#': 'getMainView',
			'nationalsParks': 'getParksListView',
			'nationalsParks/:parkId': 'getParkItemView'
		},

		getMain: function() {
			if (!this.main) {
				this.main = new Main();
			}

			return this.main;
		},

		getMainView: function() {
			(this.getMain()).getMainView();
		},

		getParksListView: function() {
			(this.getMain()).getParksListView();
		},

		getParkItemView: function( parkId ) {
			(this.getMain()).getParkItemView( parkId );
		}
	});

	return Router;
});
